package com.aiyige.page.my.localVideo;

import android.os.Parcel;
import android.os.Parcelable;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

@DatabaseTable(tableName = "localMovie")
public class LocalMovieInfo implements Parcelable {
	@DatabaseField(generatedId = true)
	public int id;
	@DatabaseField
	public String fileName;
	@DatabaseField
	public String path;
	@DatabaseField
	public String imagePath;
	@DatabaseField
	public long duration;
	@DatabaseField
	public long dateTime;
	@DatabaseField
	public long size;

	public boolean isSelected() {
		return isSelected;
	}

	public void setSelected(boolean selected) {
		isSelected = selected;
	}

	private boolean isSelected;
	
	public LocalMovieInfo() {
	}

	protected LocalMovieInfo(Parcel in) {
		id = in.readInt();
		fileName = in.readString();
		path = in.readString();
		imagePath = in.readString();
		duration = in.readLong();
		dateTime = in.readLong();
		size = in.readLong();
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeInt(id);
		dest.writeString(fileName);
		dest.writeString(path);
		dest.writeString(imagePath);
		dest.writeLong(duration);
		dest.writeLong(dateTime);
		dest.writeLong(size);
	}

	@Override
	public int describeContents() {
		return 0;
	}

	public static final Creator<LocalMovieInfo> CREATOR = new Creator<LocalMovieInfo>() {
		@Override
		public LocalMovieInfo createFromParcel(Parcel in) {
			return new LocalMovieInfo(in);
		}

		@Override
		public LocalMovieInfo[] newArray(int size) {
			return new LocalMovieInfo[size];
		}
	};

	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	
	public String getPath() {
		return path;
	}
	public void setPath(String path) {
		this.path = path;
	}
	public String getFileName() {
		return fileName;
	}
	public void setFileName(String fileName) {
		this.fileName = fileName;
	}
	public String getImagePath() {
		return imagePath;
	}
	public void setImagePath(String imagePath) {
		this.imagePath = imagePath;
	}
	public long getDateTime() {
		return dateTime;
	}
	public void setDateTime(long dateTime) {
		this.dateTime = dateTime;
	}
	public long getDuration() {
		return duration;
	}
	public void setDuration(long duration) {
		this.duration = duration;
	}
	public long getSize() {
		return size;
	}
	public void setSize(long size) {
		this.size = size;
	}



}
